﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;

namespace Windows8Accelerator.Core.Xaml.Controls
{
    public static class SuperMarginExtension
    {
        public static Thickness ToThickness(this SuperMargin superMargin, double totalWidth, double totalHeight)
        {
            return new Thickness(
                superMargin.Left.ToDouble(totalWidth, 1),
                superMargin.Top.ToDouble(totalHeight, 1),
                superMargin.Right.ToDouble(totalWidth, 1),
                superMargin.Bottom.ToDouble(totalHeight, 1)
                );
        }
    }
}
